﻿<template>
    <view class="coreshop-margin-left-10 coreshop-margin-right-10 coreshop-margin-bottom-10  coreshop-margin-top-10  coreshop-bg-white" v-if="count > 0">
        <u-notice-bar :text="notcieText" url="/pages/notice/list/list" bgColor="#ffffff" color="#333333"></u-notice-bar>
    </view>
</template>

<script>
    export default {
        name: "coreshopNotice",
        components: {
        },
        props: {
            coreshopData: {
                type: Array,
                required: true,
            }
        },
        data() {
            return {
                notcieText: "",
            }
        },
        created() {
            if (this.coreshopData.length > 0) {
                for (var i = 0; i < this.coreshopData.length; i++) {
                    this.notcieText += this.coreshopData[i].title + '【' + this.$u.timeFormat(this.coreshopData[i].createTime, 'yyyy年mm月dd日') + '】' + '\u00A0\u00A0\u00A0\u00A0\u00A0';
                }
            };
        },
        computed: {
            count() {
                return (this.coreshopData.length > 0)
            }
        }
    }
</script>
